package fr.vvins.core.catalog.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import fr.vvins.core.dao.EntityImpl;

/**
 * VinComment entity
 */
@Entity
@Table(schema="vvins",name="VV_PRODUCT_COMMENT")
public class ProductComment extends EntityImpl implements Serializable {

	private static final long serialVersionUID = 8045819798702188286L;
	
	@Id
	@GeneratedValue
	@Column(name="ID")
	private Integer id;
	
	@ManyToOne
	@JoinColumn(name="PRODUCT_ID")
	private Product product;
	private String source;
	private String comment;

	public ProductComment() {
	}

	public ProductComment(Integer id, Product product) {
		this.id = id;
		this.product = product;
	}

	public ProductComment(Integer id, Product product, String source, String comment) {
		this.id = id;
		this.product = product;
		this.source = source;
		this.comment = comment;
	}

	@Override
	public Integer getId() {
		return this.id;
	}

	@Override
	public void setId(Integer id) {
		this.id = id;
	}

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
